package com.jf3q.common.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jf3q.common.domain.EduMember;
import com.jf3q.common.mapper.EduMemberMapper;
import com.jf3q.common.service.EduMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 */
@Service
public class EduMemberServiceImpl extends ServiceImpl<EduMemberMapper, EduMember>
    implements EduMemberService{
    @Autowired
    EduMemberMapper memberMapper;

    public EduMember MemberByUsername(String mobile){
        LambdaQueryWrapper<EduMember> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(EduMember::getMobile, mobile);
        EduMember member = this.getOne(queryWrapper);
        if (member == null) {
            throw new RuntimeException("用户名不存在");
        }
        return member;
    }

}




